package com.practice.controller.admin;

import com.practice.common.result.Result;
import com.practice.pojo.admin.dto.ConfigDTO;
import com.practice.service.user.IndexService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/sys_config")
public class SysConfigController {
    
    @Autowired
    private IndexService indexService;
    
    @GetMapping("/all")
    public Result all(){
        return indexService.all();
    }

    @PostMapping("/update")
    public Result update(@RequestBody List<ConfigDTO> dtoList){
        return indexService.update(dtoList);
    }
    
}
